package Animals;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-09-27
 * Time:10:57
 */
class Animals{
    String name;
    int age;
    public Animals(String name,int age){
        this.age=age;
        this.name=name;
    }
    public void eat(){
        System.out.println("吃饭");
    }
}
interface IRun{
    void running();
}
interface IFly{
    void flying();
}
interface ISwimming{
    void swimming();
}
class Bird extends Animals implements IFly,IRun{

    public Bird(String name, int age) {
        super(name, age);
    }

    @Override
    public void running() {
        System.out.println(name+"跑");
    }

    @Override
    public void flying() {
        System.out.println(name+"飞");
    }
}
public class Animal {
    public static void walk(IRun running){
        running.running();
    }
    Bird bird=new Bird("LaiFu",2);
}
//抽象类和接口的区别
//